Skip to content

Comments

Алексей Золотыx, домашнее задание №2#20

Open
zolotyh wants to merge 7 commits intoClojure-Developer:mainfrom
zolotyh:task-2
Open

Алексей Золотыx, домашнее задание №2#20
zolotyh wants to merge 7 commits intoClojure-Developer:mainfrom
zolotyh:task-2

Conversation

@zolotyh
Copy link

@zolotyh zolotyh commented Jan 3, 2024

No description provided.

@zolotyh zolotyh changed the title Task 2 Алексей Золотыx, домашнее задание №2 Jan 6, 2024
(defn is-pangram [test-string])
(defn is-pangram [test-string]

(= alphabet

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

вот тут опасно сравнивать со строкой. дело в том что множества это не упорядоченные коллекции и в зависимости от используемой хэш функции можно получить разный порядок элементов. множества всегда безопасней сравнивать с другими множествами

(cond
(= (rem n 3) 0) "Fizz"
(= (rem n 5) 0) "Buzz"
:else "FizzBuzz")]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не верно указана ветка :else
например
(fizz-buzz 4)
=> "FizzBuzz"
хотя должно быть 4. FizzBuzz возвращаем только если кратно 5 и 3 одновременно

(recur 1 (inc j) matrix))
matrix)))

(defn common-child-length [first-string second-string]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

очень элегантное решение 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants